package com.liuhouse1.service.impl;

import com.liuhouse1.dao.StudentMapper;
import com.liuhouse1.model.Student;
import com.liuhouse1.service.StudentService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

//@Service表示将此类交给springIOC容器进行实例化，放入到容器对象中  可以直接使用
@Service
public class StudentServiceImpl implements StudentService {

    @Resource
    private StudentMapper studentMapper;

    @Override
    public Student queryStudent(Integer id) {
        Student student = studentMapper.selectStudentById(id);
        return student;
    }
}
